package org.ffrl.design.factory.simple;

import org.ffrl.design.factory.Pizza;
import org.ffrl.design.factory.PizzaType;

public class SimplePizzaStore {
    
//    private SimpleFactory simpleFactory = null;
//    
//    public SimplePizzaStore(SimpleFactory factory) {
//        this.simpleFactory = factory;
//    }
    
    public Pizza createPizza(PizzaType type) {
        //Pizza pizza = simpleFactory.createPizza(type);
        // 常用
        Pizza pizza = SimpleFactory.commonCreatePizza(type);
        pizza.prepare();
        pizza.box();
        return pizza;
    }
}
